#include "PH.h"


void PDMA_Init(void) 
{
	PDMACH_InitTypeDef PDMACH_InitStructure;
	/* Configure PDMA channel to move ADC result from ADC->DR[0] to DataBuffer                               */
  PDMACH_InitStructure.PDMACH_SrcAddr = (u32)&HT_ADC->DR[0];
  PDMACH_InitStructure.PDMACH_DstAddr = (u32)&HT_MCTM1->CH1CCR;
  PDMACH_InitStructure.PDMACH_BlkCnt = 1;
  PDMACH_InitStructure.PDMACH_BlkLen = 1;
  PDMACH_InitStructure.PDMACH_DataSize = WIDTH_32BIT;
  PDMACH_InitStructure.PDMACH_Priority = VH_PRIO;
  PDMACH_InitStructure.PDMACH_AdrMod = SRC_ADR_FIX | DST_ADR_FIX | AUTO_RELOAD;
  PDMA_Config(PDMA_CH0, &PDMACH_InitStructure);
}